package com.ibook.dao;

import com.ibook.bo.BookBo;
import com.ibook.pojo.Book;
import com.ibook.vo.BookCommentVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface BookMapper {
    int deleteByPrimaryKey(Integer bookId);

    int insert(Book record);

    int insertSelective(Book record);

    Book selectByPrimaryKey(Integer bookId);

    int updateByPrimaryKeySelective(Book record);

    int updateByPrimaryKey(Book record);

    List<Book> selectByCategoriesId(int categoriesId);

    List<Book> searchList(@Param("bookName")String bookName, @Param("categoriesName") String categoriesName,
                            @Param("authorName")String authorName, @Param("publishingName")String publishingName);

    BookBo bookDetail(int bookId);

    List<Book> selectByCategoriesIdLim(int categoriesId);

    int raiseHots(int BookId);

    int selectBookHots(int BookId);

    int commentToBook(@Param("userId")int userId,@Param("bookId")int bookId,@Param("detail")String detail);

    List<BookCommentVo> bookComments(int bookId);
}